{template game_header}

<style>
    .hp-visited a:visited{color: #444;}
    .input-append button{font-size:12px;}
    select,.f12{font-size:12px;}
    #no_user,#user_show{display:none;}
</style>
<div style="clear:both">
    <h5>
        <span class="add-on"><i class="icon-calendar"></i> {if !$isNew}添加{else}修改{/if}POI </span>
        <span class="add-on">
            <code><a href="?c=adminGame&a=poiManage">返回上一级</a></code>
        </span>
    </h5>
</div>

<table class="table table-striped table-bordered table-hover" height="850"><tr><td>
<div style="clear:both;margin: 50px;">
    <form class="form-horizontal" method="post" enctype="multipart/form-data" action="?c=adminGame&a=addPoiRule" onsubmit="return subtn();">
        <input name="id" type="text" value="{$pioRuleInfo['id']}" style="display:none;">
        <div class="control-group">
            <label class="control-label"><b style="color:red;">*</b>名称 </label>
            <div class="controls">
                <input name="name" type="text" placeholder="名称" value="{$pioRuleInfo['name']}" style="font-size:12px;">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">类型 </label>
            <div class="controls">
                <select class="input-small" name="boss_type">
                    <option value="0" {if $pioRuleInfo['boss_type'] == 0}selected="selected"{/if}>小怪</option>
                    <option value="1" {if $pioRuleInfo['boss_type'] == 1}selected="selected"{/if}>中怪</option>
                    <option value="2" {if $pioRuleInfo['boss_type'] == 2}selected="selected"{/if}>大怪</option>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="province_city">icon </label>
            <div class="controls">
                <input type="hidden" name="keepIcon" value="{$pioRuleInfo['img_icon']}">
                <input name="img_icon" type="file"><img src="{$pioRuleInfo['img_icon']}" {if !$isNew}style="display:none;"{/if}>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="province_city">大图 </label>
            <div class="controls">
                <input type="hidden" name="keepImgbig" value="{$pioRuleInfo['img_big']}">
                <input name="img_big" type="file"><img src="{$pioRuleInfo['img_big']}" {if !$isNew}style="display:none;"{/if}>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">体力值 </label>
            <div class="controls">
                <input name="hp" type="text" placeholder="体力值" value="{$pioRuleInfo['hp']}" style="font-size:12px;">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">攻击力 </label>
            <div class="controls">
                <input name="attack" type="text" placeholder="攻击力" value="{$pioRuleInfo['attack']}" style="font-size:12px;">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">免伤比 </label>
            <div class="controls">
                <input name="attack_reduce" type="text" placeholder="免伤比" value="{$pioRuleInfo['attack_reduce']}" style="font-size:12px;">%
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">关键字 </label>
            <div class="controls">
                <input name="poi_keywords" type="text" placeholder="关键字以符号隔开" value="{$pioRuleInfo['poi_keywords']}" style="font-size:12px;">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="province_city">是否删除 </label>
            <div class="controls">
                <select class="input-small" name="is_show">
                    <option value="1" {if $pioRuleInfo['is_show'] == 1}selected="selected"{/if}>否</option>
                    <option value="0" {if $pioRuleInfo['is_show'] == 0}selected="selected"{/if}>是</option>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputStatus"></label>
            <div class="controls">
                <input type="submit" onclick="subtn" class="btn btn-primary" value="提交">&nbsp;&nbsp;
                <input type="reset" class="btn btn-inverse" value="重置">
            </div>
        </div>
    </form>
</div>
</td></tr></table>

<script type="text/javascript">
    function subtn(){
      var name = $("[name=name]").val();
      var attack_reduce = $("[name=attack_reduce]").val();
      
      if(name == ''){
        alert("名称不能为空");
        return false;
      }
      if(attack_reduce != ''){
        if(isNaN(attack_reduce)){
            alert("免伤比必须为数字");
            return false;
        }
      }
    }
</script>

{template footer}